﻿using NetTopologySuite.Algorithm;
using NetTopologySuite.Geometries;
using Quartz.Impl.AdoJobStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Business.Interface
{
    public class LogisticsInfo
    {
        public string RowId { get; set; }
        /// <summary>
        /// 物流单号 
        /// </summary>
        public string number { get; set; }
        /// <summary>
        /// 源单类型
        /// </summary>
        //public string orderType { get; set; }
        /// <summary>
        /// 运输商代码 
        /// </summary>
        public string carrier { get; set; }
        /// <summary>
        /// 运输商简称
        /// </summary>
        public string carrierName { get; set; }
        /// <summary>
        /// 国家
        /// </summary>
        public string country { get; set; }
        /// <summary>
        /// 物流状态
        /// </summary>
        public string _state; 
        public string state 
        {
            get 
            { 
                return _state; 
            
            }

            set {

                if (value == "AvailableForPickup") _state = "到达待取";
                else if (value == "Delivered") _state = "成功签收";
                else if (value == "DeliveryFailure") _state = "投递失败";
                else if (value == "Exception") _state = "可能异常";
                else if (value == "Expired") _state = "运输过久";
                else if (value == "InfoReceived") _state = "收到信息";
                else if (value == "InTransit") _state = "运输途中";
                else if (value == "NotFound") _state = "查询不到";
                else if (value == "OutForDelivery") _state = "派送途中";
                else  _state = value;
            }
        
        
        }
        /// <summary>
        /// 物流详情 
        /// 时间:time_raw
        /// 地点:location
        /// 里程碑:stage
        /// 包裹子状态:sub_status
        /// 事件描述:description
        /// </summary>
        public string eventInfo { get; set; }

        /// <summary>
        /// 运输商联系电话 
        /// </summary>
        public string tel { get; set; }
        /// <summary>
        /// 运输商官网 
        /// </summary>
        public string homepage { get; set; }
        

        /// <summary>
        /// 间隔天数 
        /// </summary>
        public string days_after_order { get; set; }
        /// <summary>
        /// 包裹风险系数 
        /// </summary>
        public string risk_factor { get; set; }
        /// <summary>
        /// 服务类型 
        /// </summary>
        public string service_type { get; set; }
        /// <summary>
        /// 原始重量 
        /// </summary>
        public string weight_raw { get; set; }
        /// <summary>
        /// 重量信息(KG) 
        /// </summary>
        public string weight_kg { get; set; }
        /// <summary>
        /// 件数 
        /// </summary>
        public string pieces { get; set; }
        /// <summary>
        /// 原始体积尺寸(长宽高) 
        /// </summary>
        public string dimensions { get; set; }
        /// <summary>
        /// 收货客户单号 
        /// </summary>
        public string customer_number { get; set; }


        /// <summary>
        /// 发件国家 
        /// </summary>
        public string shipper_country{ get; set; }
        /// <summary>
        /// 发件州、省 
        /// </summary>
        public string shipper_state { get; set; }
        /// <summary>
        /// 发件城市 
        /// </summary>
        public string shipper_city { get; set; }
        /// <summary>
        /// 发件街道 
        /// </summary>
        public string shipper_street { get; set; }
        /// <summary>
        /// 收件国家
        /// </summary>
        public string recipient_country { get; set; }
        /// <summary>
        /// 收件州、省
        /// </summary>
        public string recipient_state { get; set; }
        /// <summary>
        /// 收件城市
        /// </summary>
        public string recipient_city { get; set; }
        /// <summary>
        /// 收件街道
        /// </summary>
        public string recipient_street { get; set; }

        /// <summary>
        /// 状态持续小时
        /// </summary>
        public string stateHour { get; set; }
        /// <summary>
        /// 数据更新时间
        /// </summary>
        public string updTime { get; set; }
        /// <summary>
        /// 状态日志
        /// </summary>
        public string stateLog { get; set; }

    }

}
